<?php


namespace app\api\model;


use think\Model;

class UserModel extends Model
{
    protected $table = 'user';

    /**
     * 通过用户名获取用户信息
     * @param $username
     * @return array
     */
    public function getUserByUsername($username)
    {
        if (empty($username)){
            return false;
        }
        return $this->where('username',$username)->find();
    }
}
